home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 81 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.4 KB

  1. From: David Byrden <100101.2547@compuserve.com>
  2. Message-ID: <4dsr6m$tr5@news.bridge.net>
  3. X-Original-Date: 21 Jan 1996 07:49:42 GMT
  4. Path: in1.uu.net!bounce-back
  5. Date: 21 Jan 96 10:58:18 GMT
  6. Approved: fjh@cs.mu.oz.au
  7. Newsgroups: comp.std.c++
  8. Subject: Clarify DWP wording please
  9. Organization: self-employed
  10. X-Mailer: Mozilla 1.1N (Windows; I; 16bit)
  11. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  12.     iQBFAgUBMQIcXeEDnX0m9pzZAQHF4wF+NXimepyETajDfc7O/0Adtf5AtIMZuIbz
  13.     qrBdeBA62Z9LppvsVuJA+dzQmwagiNtt
  14.     =SAuq
  15.  
  16. An earlier post of mine seems to be lost, so here is my question put in 
  17. another light;
  18.  
  19. The Sep 95 standard says, for certain containers, that in certain cases 
  20. an operation will not invalidate iterators and references to its 
  21. elements. For example, 23.2.5.6
  22.  
  23. "If no reallocation happens, all the iterators and references before the 
  24. insertion point remain valid."
  25.  
  26. My question; by "references", does it mean actual T& that you may have 
  27. declared like so;
  28.  
  29.     T& myRef = myVector[0] ;
  30.  
  31. OR does it mean objects of the container's own specific reference type, 
  32. like this;
  33.  
  34.        vector<int>::reference = myVector[0] ;
  35.  
  36. This distinction is not trivial; it will determine allocators can be used 
  37. with memory devices other than plain RAM.
  38.  
  39.  
  40.              David
  41. ---
  42. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  43.   Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  44.   is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
  45.